home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / btrieve / btr61m.exe / 07CH3B.TXT < prev    next >
Text File  |  1993-07-16  |  23KB  |  652 lines

  1. CHAPTER 3       INSTALLING AND CONFIGURING BTRIEVE (continued)
  2.  
  3. Unloading the Earlier Version of Btrieve
  4.  
  5. To unload an earlier version of Btrieve from a
  6. server's memory, enter the following command at the
  7. server console or at a workstation running RCONSOLE:
  8.  
  9.    BSTOP
  10.  
  11. The BSTOP command runs a NetWare command file
  12. (BSTOP.NCF) that unloads the following modules in the
  13. order shown:
  14.  
  15. 1. BROUTER.NLM
  16. 2. BSPXCOM.NLM
  17. 3. BTRIEVE.NLM
  18.  
  19. NOTE: BSTOP.NCF does not unload BSPXSTUB or RSPXSTUB.  To
  20. unload these modules, type UNLOAD followed by the
  21. module name.
  22.  
  23.  
  24. Starting Btrieve v6.x
  25.  
  26. After installing Btrieve v6.x (as discussed in "Using
  27. the NetWare INSTALL Utility"), you can
  28. start it by entering the following at the server
  29. console or at a workstation running RCONSOLE:
  30.  
  31.    BSTART
  32.  
  33.  
  34. Stopping Btrieve v6.x
  35.  
  36. To stop Btrieve v6.x, enter the following command at
  37. the server console or at a workstation running
  38. RCONSOLE:
  39.  
  40.    BSTOP
  41.  
  42. The BSTOP command runs a NetWare command file
  43. (BSTOP.NCF) that unloads the following modules in the
  44. order shown:
  45.  
  46. 1. BROUTER.NLM
  47. 2. BSPXCOM.NLM
  48. 3. BTRIEVE.NLM
  49.  
  50. NOTE: BSTOP.NCF does not unload BSPXSTUB or RSPXSTUB.  To
  51. unload these modules, type UNLOAD followed by the
  52. module name.
  53.  
  54.  
  55. Rebuilding Existing Btrieve Files
  56.  
  57. If your database contains files created with versions
  58. of Btrieve prior to v6.x, you may want to upgrade
  59. these files to take advantage of the Btrieve v6.x
  60. features.  Btrieve v6.x works with v5.x files; however,
  61. it does not implement the v6.x features.
  62.  
  63. The Btrieve Rebuild utility (BREBUILD.NLM) converts
  64. Btrieve data files to the v6.x format.  You can run
  65. this utility from either the server console or a
  66. workstation running RCONSOLE.  Use either of the
  67. following methods to run the Rebuild utility:
  68.  
  69. o Interactively through the Setup utility - When you
  70.   run the Rebuild utility interactively, it checks the
  71.   values you enter to ensure they are within the proper
  72.   ranges.
  73.  
  74. o From the command line - When you use this method, the
  75.   utility checks your entries and displays messages if
  76.   the values you entered are not within the proper
  77.   ranges.  With this method, you can specify a command
  78.   file.  The following sections discuss running the
  79.   utility interactively and from the command line.
  80.  
  81. IMPORTANT: Before running this utility, make sure you have
  82. unloaded your previous version of Btrieve, started
  83. Btrieve v6.x, and backed up all your data files.
  84. Having a backup copy ensures against data loss if a
  85. power interruption occurs while you are running this
  86. utility.
  87.  
  88. To ensure that your backup is successful, perform one
  89. of the following:
  90.  
  91. o Close all Btrieve files before running the backup
  92.   utility.
  93.  
  94. o Use continuous operations.
  95.  
  96. o Use a backup utility that opens the Btrieve files in
  97.   exclusive write mode so that other processes cannot
  98.   write to the files.  Ensure that the backup utility
  99.   has exclusive rights to the files.
  100.  
  101.  
  102. Running the Rebuild Utility Interactively
  103.  
  104. You can run the Rebuild utility interactively through
  105. the Set Rebuild Configuration option on the Setup
  106. utility╒s Available Options menu.  As the following
  107. sections explain, you can use the Set Rebuild
  108. Configuration option to do the following:
  109.  
  110. o Configure the Rebuild utility
  111. o Execute the Rebuild utility
  112. o Check the utility╒s error log
  113.  
  114.  
  115. Configuring the Rebuild Utility
  116.  
  117. Complete the following steps to set the configuration
  118. options that apply to rebuilding your Btrieve files:
  119.  
  120. 1.  After starting Btrieve v6.x, load the Setup
  121. utility by entering LOAD BSETUP at the prompt.
  122.  
  123. 2.  When the Available Options menu appears, select
  124. Set Rebuild Configuration to run the Rebuild utility.
  125. A warning appears, indicating you should back up your
  126. Btrieve data files before proceeding.
  127.  
  128. NOTE:  If you do not have current backups, you should
  129. press Esc three times.  When the Exit Btrieve Setup?
  130. prompt appears, select Yes.  Create backups and then
  131. return to this utility.
  132.  
  133. 3.  Provided you have current backups of your data
  134. files, press Esc to continue to the Rebuild Options
  135. menu.
  136.  
  137. 4.  Select Set Rebuild Configuration to display the
  138. Rebuild Configuration Setup Form screen.
  139.  
  140. 5.  Select the files you want to rebuild, as
  141. follows:
  142.  
  143. a.  With your cursor at Files To Be Converted,
  144. press Enter and then Insert.
  145.  
  146. b.  When the list of available volumes appears,
  147. highlight the volume you want and press Enter.  The
  148. utility displays the directories available on the
  149. selected volume.
  150.  
  151. c.  Highlight the directory you want and press Enter.
  152.  
  153. d.  Continue highlighting directories (that is,
  154. subdirectories) and pressing Enter until you have
  155. reached the one that contains the file or files you
  156. want to rebuild.  Then, press Esc.
  157.  
  158. e.  Choose the files you want to rebuild, as follows:
  159.  
  160. To specify more than one file, enter the filenames
  161. manually, using wildcard characters (* or ?).  For
  162. example, you might enter /*.* to specify all files in
  163. the selected directory, or you could enter /*.BTR to
  164. specify all files in that directory with the extension
  165. .BTR.
  166.  
  167. To specify an individual file, press Enter to list the
  168. filenames in the specified directory.  Highlight the
  169. filename you want, and press Enter to select it.  (The
  170. input files that are listed are on the local server.)
  171.  
  172. 6.  At Output Directory, specify the location you want
  173. to use for the rebuilt files, as follows.  (The
  174. default location is the directory you specified for
  175. the Files To Be Converted field.)
  176.  
  177. a.  Press Enter.
  178.  
  179. b.  Either type the server or directory name manually
  180. and press Enter, or choose from the list of available
  181. directories on the current server by entering a valid
  182. path and pressing Insert.  To select a directory name
  183. from the list, highlight the name and press Enter.
  184.  
  185. If you want to place the rebuilt files on a different
  186. server, you must type the output server name, volume,
  187. and path manually.  Then, press Enter.
  188.  
  189. NOTE:  To place rebuilt files on a different server,
  190. Btrieve and the Message Router must be loaded on the
  191. server where the original data files reside, and the
  192. Btrieve and BSPXCOM NLMs must be loaded on the server
  193. that will contain the rebuilt files.  Wherever you
  194. locate the rebuilt files, you will need enough disk
  195. space for the rebuilt files and the temporary files
  196. that the utility creates.  The utility deletes the
  197. temporary files at the end of the conversion process.
  198.  
  199. Do not use wildcard characters in the pathname that
  200. specifies the location for the rebuilt files.
  201.  
  202. c.  After specifying the output directory, use the
  203. Down- Arrow key to move to the Page Size field.
  204.  
  205. 7.  At Page Size, type the size manually or choose
  206. from a list of sizes.
  207.  
  208. To list the available page sizes, press Enter.  In
  209. this list, the AUTO option (the default) means the
  210. utility will choose the optimum page size for the
  211. files.  The EXISTING option means the utility will use
  212. the same page size as that of the original files.  To
  213. select a size from the list, highlight it and press
  214. Enter.
  215.  
  216. NOTE:  When you use the EXISTING option, the utility
  217. changes the page size if the original size will not
  218. work.  For example, assume you have a Btrieve v5.x
  219. file with a page size of 1,024 and 24 keys.  Since
  220. Btrieve v6.x supports only 23 keys for a file of that
  221. page size, the utility selects a new page size for the
  222. file and displays an informative message on the screen.
  223.  
  224. 8.  At Key Number, specify a number between 0 and 23
  225. on which to sort the records, or specify -1 to sort
  226. the records in physical order; then, press Enter.
  227.  
  228. IMPORTANT:  If you are using NetWare SQL, you must
  229. specify a key number of 0 when rebuilding the VIEW.DDF
  230. file.
  231.  
  232. 9.  At Preserve TTS Setting, specify Y (for Yes) or N
  233. (for No) to indicate whether you want to preserve the
  234. Transaction Tracking System (TTS) bit during
  235. conversion; then, press Enter.  If you specify Y, the
  236. utility preserves the bit.  If you specify N (the
  237. default), the utility clears the bit when creating
  238. Btrieve v6.x files.
  239.  
  240. 10.  At Conversion Method, select the conversion
  241. method as follows:
  242.  
  243. a.  Press Enter.
  244.  
  245. b.  Highlight either PRIMARY (the default) or
  246. SECONDARY, and then press Enter.
  247.  
  248. The PRIMARY method clones the files, drops the indexes,
  249. copies the records into the new files, and rebuilds the
  250. indexes.  Since this method is faster and creates
  251. smaller files, you should use this method whenever
  252. possible.  However, if you are using NetWare SQL, you
  253. must not use this method when rebuilding the VIEW.DDF
  254. file.
  255.  
  256. The SECONDARY method clones and copies the files
  257. without dropping and replacing indexes.  This method
  258. may be slower than the Primary method.
  259.  
  260. IMPORTANT:  If you are using NetWare SQL, you must
  261. specify the SECONDARY method when rebuilding the
  262. VIEW.DDF file.  The SECONDARY method may create a v6.x
  263. file in which the records are in a different physical
  264. order than in the original v5.x file.
  265.  
  266. 11.  At Continue On Error, specify either Y (for Yes)
  267. or N (for No) and press Enter.
  268.  
  269. If you specify Y, the utility continues if it
  270. encounters an error.  (The utility notifies you of
  271. non-Btrieve files or other errors but continues
  272. rebuilding Btrieve files.) If you specify N, the
  273. utility stops if it encounters an error and aborts the
  274. rebuild process.
  275.  
  276. 12.  At Convert Supplemental Indexes, specify Y (for
  277. Yes) or N (for No) and press Enter.
  278.  
  279. If you specify Y, the utility converts Btrieve v5.x
  280. supplemental indexes (which allow duplicates) to
  281. Btrieve v6.x indexes with linked duplicates.  Btrieve
  282. v5.x supplemental indexes have, by default, repeating
  283. duplicates.  If you specify N (the default), the
  284. utility does not convert the v5.x supplemental indexes
  285. but preserves them as repeating duplicates.
  286.  
  287. IMPORTANT:  Do not use the Convert
  288. Supplemental Indexes option if you access your data
  289. files through NetWare SQL.
  290.  
  291. 13.  Press Esc to leave the Rebuild Configuration
  292. Setup Form screen.
  293.  
  294. 14.  When the utility asks whether to save your
  295. changes, select Yes to save them and return to the
  296. Rebuild Options menu or No to abandon the changes.
  297.  
  298. IMPORTANT:  The utility applies the Btrieve v5.x
  299. file's owner name and level to the Btrieve v6.x file.
  300.  
  301.  
  302. Executing the Rebuild Utility
  303.  
  304. After configuring the Rebuild utility, you are ready
  305. to rebuild your files.  At the Rebuild Options menu,
  306. select Execute Rebuild to run the utility.
  307.  
  308. The utility executes and also creates a log file.  It then
  309. notifies you that the process has completed.  To
  310. return to the Rebuild Options menu, press Esc.  You
  311. can then check the log file as discussed in the
  312. following section.
  313.  
  314.  
  315. Checking the Rebuild Log File
  316.  
  317. After rebuilding your files, be sure to check the
  318. utility's log file to see if any errors occurred
  319. during the conversion, as follows:
  320.  
  321. 1.  Select View Rebuild Log File from the Rebuild
  322. Options menu.  The utility displays a log of any
  323. errors that occurred while the utility was executing,
  324. similar to the following example:
  325.  
  326. 2.  When you finish viewing the log, press Esc to
  327. return to the Rebuild Options menu.  To exit both the
  328. Rebuild utility and the Setup utility, press Esc twice
  329. more and specify Yes at the Exit Btrieve Setup?
  330. prompt.
  331.  
  332.  
  333. Running the Rebuild Utility from the Command Line
  334.  
  335. Before running the Rebuild utility from the command
  336. line, make sure you have unloaded your previous
  337. version of Btrieve, started Btrieve v6.x, and backed
  338. up all your data files.  Having a backup copy ensures
  339. against data loss if a power interruption occurs while
  340. you are running this utility.
  341.  
  342. NOTE: After rebuilding your files, be sure to check the
  343. utility's log file to see if any errors occurred
  344. during the conversion.  The log file (BREBUILD.LOG)
  345. that the Rebuild utility creates is an ASCII text
  346. file.  The .LOG file is placed in the SYS:SYSTEM
  347. directory.  You can view it by using a text editor or
  348. by running the Rebuild utility interactively and
  349. selecting View Rebuild Log File from the Rebuild
  350. Options menu (as explained in "Checking the Rebuild
  351. Log File").  To run the Rebuild utility
  352. from the command line, enter the following command at
  353. the prompt:
  354.  
  355.  
  356.    LOAD BREBUILD [-option ...] file
  357.    or
  358.    LOAD BREBUILD @commandFile
  359.  
  360. option
  361. Specifies the configuration options for the utility.
  362. Precede each option letter with a dash (-).  Do not
  363. place a space between the dash and the option letter
  364. and between the option letter and its value.  You can
  365. enter the option letter in uppercase or lowercase.
  366.  
  367. -B[path]
  368. Specifies an alternate location for the rebuilt
  369. files.  (The default location is the current
  370. directory.) This option lets you rebuild large files
  371. on a different volume or on a different server.  To
  372. locate the files on a different server, the Btrieve
  373. NLM and the Message Router must be loaded on the server
  374. where the original data files reside, and the Btrieve
  375. and BSPXCOM NLMs must be loaded on the server that will
  376. contain the rebuilt files.
  377.  
  378. IMPORTANT:  Do not use wildcard characters in the
  379. pathname you specify with the ╨B option.
  380.  
  381. - C
  382. Instructs the utility to continue with the next file
  383. even if an error occurs.  The utility notifies you of
  384. non-Btrieve files or other errors but continues
  385. updating Btrieve files.  This option is useful if you
  386. have specified wildcard characters for the rebuilt
  387. files.
  388.  
  389. -D
  390. Converts Btrieve v5.x supplemental indexes (which
  391. allow duplicates) to v6.x indexes with linked
  392. duplicates.  (By default, the utility preserves the
  393. indexes as repeating duplicates.) If you access your
  394. data files only through Btrieve and your files have a
  395. relatively large number of duplicate keys, you can use
  396. this option to enhance the performance of the Get Next
  397. and Get Previous operations.
  398.  
  399. IMPORTANT:  Do not use the -D option if you access
  400. your data files through NetWare SQL.
  401.  
  402. -M0 | M2
  403. Specifies the converison method, as follows:
  404.  
  405. M0 Clones and copies the files without dropping and
  406.    replacing indexes. While this method is slower
  407.    than M2, it is available in casy you do not want
  408.    to rebuild your indexes.
  409.  
  410. IMPORTANT: If you are using NetWare SQL, you must use
  411. the -M0 and -K0 options to rebuild the VIEW.DDF file.
  412.  
  413. M2 (Default) Clones the files, drops the indexes, copies
  414.    the records into the new files, and rebuilds the
  415.    indexes.  Since this method is faster and creates
  416.    smaller files, you should use it whenever possible.
  417.  
  418. IMPORTANT: The M2 method may create a v6.x file in which the
  419. records are in a different physical order than in the
  420. original v5.x file.
  421.  
  422. -P[nnn]
  423. Specifies the page size (in bytes) of the new files.
  424. If you specify -P with no page size, the utility
  425. chooses the optimum page size for your file.
  426.  
  427. NOTE:  If you do not specify the -P parameter,
  428. the utility will change the page size if the
  429. original size will not work.
  430.  
  431. For example, assume you have a Btrieve 5.x file
  432. with a page size of 1,024 and 24 keys.  Since Btrieve
  433. v6.x supports only 23 keys for a page size of 1,024,
  434. the utility automatically selects a new page size for
  435. the file and displays an informative message on the
  436. screen.
  437.  
  438. -K[nn]
  439. Specifies the key by which the utility reads when
  440. rebuilding a file.  If you do not specify this option,
  441. the utility reads the file in physical order.  You
  442. must use the -K0 option when rebuilding NetWare SQL's
  443. VIEW.DDF file.
  444.  
  445. -T
  446. Does not preserve the Transaction Tracking System
  447. (TTS) bit during conversion.  If you specify this
  448. option, the utility clears the TTS bit (if set) when
  449. converting a Btrieve v5.x file to a Btrieve v6.x
  450. file.  If you do not specify this option, the utility
  451. sets the TTS bit when creating the Btrieve v6.x file if
  452. the v5.x file had the TTS bit set.  file
  453.  
  454. Specifies the set of files to convert. Use full directory
  455. names, including the volume name.  You may use
  456. wildcards (* and ?) in these filenames.  The Rebuild
  457. utility applies the Btrieve v5.x file's owner name and
  458. level to the Btrieve v6.x file.
  459.  
  460. @commandFile
  461. Specifies a command file for the utility to execute.
  462. You can include multiple entries in one command file.
  463. Each entry in the command file contains the utility
  464. options (if any) and the set of files to convert,
  465. followed by <end> or [end].  When specifying the files
  466. to convert, be sure to use full directory names,
  467. including the volume name.  You may use wildcards (*
  468. and ?) in these filenames.  The following is an
  469. example of a Rebuild utility command file:
  470.  
  471.    -C sys:\mydir\*.* <end>
  472.    -C -P1024 dta:\dir\*.* <end>
  473.    -M0 -K0 sys:\nwsql\*.* <end>
  474.  
  475. Examples
  476. The first example places the rebuilt files on another
  477. server:
  478.  
  479.    LOAD BREBUILD -Bserv-temp\sys:\newfiles -C -P4096
  480.       sys:\oldfiles\*.btr
  481.  
  482. The next example places the rebuilt files on the same
  483. server, but on a different volume:
  484.  
  485.    LOAD BREBUILD -Bvol2:\btrfiles -C -P4096 -M2
  486.       sys:\btrfiles\*.btr
  487.  
  488.  
  489. Deleting Temporary Files
  490.  
  491. By default, the Rebuild utility creates temporary
  492. files in the same directory in which the conversion
  493. takes place.  (You can specify a different directory
  494. by using the -B option when running the Rebuild
  495. utility from the command line, or by using the Output
  496. Directory option on the Setup Form screen when running
  497. the utility interactively.)
  498.  
  499. You need enough disk space to accommodate the original
  500. file and the new file while the Rebuild utility is
  501. running.
  502.  
  503. NOTE:  The Rebuild utility deletes the original
  504. file after rebuilding it, even if the new file is in a
  505. different directory.
  506.  
  507. Normally, the Rebuild utility automatically deletes
  508. temporary files when the conversion is complete.
  509. However, if a power failure or other serious
  510. interruption occurs, the Rebuild utility may not
  511. delete the temporary files.  If this occurs, look for
  512. filenames such as _T-xxxxx.TMP and delete them.
  513.  
  514.  
  515. Using Btrieve with NetWare Runtime
  516.  
  517. The NetWare Runtime serialized NetWare operating system
  518. differs from the other versions of NetWare in that it
  519. grants file service access to only one NetWare login
  520. client connection.  This login is for system
  521. administration purposes.  NetWare Runtime does not
  522. limit the number of SPX or AppleTalk connections
  523. between client applications and NLM-based services.
  524. Consequently, NetWare Runtime does not limit the
  525. number of users that can access Btrieve running on the
  526. Runtime server.
  527.  
  528. Figure 3-1 illustrates the relationship between
  529. NetWare Runtime and a NetWare configuration that is
  530. not dedicated to database services.
  531.  
  532. Figure 3-1
  533. NetWare
  534. Configurations
  535.  
  536.       +----------------+    +----------+         +----------+
  537.       | File and Print |    | Database |         | Database |
  538.       |    Services    |    | Services |         | Services |
  539.       +----------------+    +----------+         +----------+
  540.    +--------------------------------------+     +-----------------+
  541.    |            NetWare          |     | NetWare Runtime |
  542.    +--------------------------------------+     +-----------------+
  543.       Nondedicated Configuration           Dedicated Configuration
  544.  
  545.  
  546.  
  547. Reasons to Use NetWare Runtime
  548.  
  549. Running NetWare Btrieve on a server dedicated to
  550. database management ensures that all the server's
  551. processing power is directed toward database
  552. applications.  If you anticipate heavy file service
  553. activity, a dedicated database server makes that
  554. activity more efficient because it frees the
  555. nondedicated server to devote all its resources to
  556. file services.
  557.  
  558. Having a dedicated database server is also
  559. particularly effective in preventing slow performance
  560. on the network during periods of heavy file service
  561. activity.  To optimize network performance, you can
  562. configure so as to include a dedicated database server
  563. in addition to other servers offering full NetWare 4.0
  564. services.  Figure 3-2 shows an example installation
  565. for NetWare Runtime.
  566.  
  567. Figure 3-2
  568. NetWare Runtime
  569. Installation
  570.  
  571.    Dedicated database +------+         +------+    Standard NetWare
  572.    server running     |      |...... |        |    providing file and
  573.    NetWare Runtime    +------+         +------+    print services
  574.           .                       .
  575.          .          Database                   .
  576.         .                        .
  577.        .                         .
  578.     Local Area Network                     .
  579.         .                         .
  580.          .                        .
  581.           .                        .
  582.            +-------+               +-------+
  583.            |       |               |       |
  584.            +-------+               +-------+
  585.           Workstation              Workstation
  586.            .                   .
  587.             .        +------+      .
  588.               .     |      |     .
  589.                .    +------+    .
  590.              ..... Workstation .....
  591.  
  592.  
  593.  
  594. Installing NetWare Runtime
  595.  
  596. The installation procedure for NetWare Runtime is
  597. identical to installing the other versions of
  598. NetWare.  Refer to the documentation that accompanies
  599. your NetWare Runtime software for instructions.
  600.  
  601.  
  602. Special Notes on NetWare Runtime
  603.  
  604. NetWare Runtime supplies a facility (NLICLEAR.NLM)
  605. that clears unused connections.  NetWare Runtime
  606. provides only one available client connection.  Even
  607. after the administrator logs out of the application
  608. server, a connection is maintained between the
  609. workstation and the server.  If a second administrator
  610. wants to log on to the application server from a
  611. second workstation, the single connection will be
  612. unavailable.
  613.  
  614. The NLICLEAR facility is important for NetWare Runtime
  615. because, at intervals, NLICLEAR automatically clears
  616. the unused connections left after an administrator
  617. logs out of the application server, allowing another
  618. administrator to log in to and administer the database
  619. server.
  620.  
  621.  
  622. Special Notes on Btrieve
  623.  
  624. When you load the Btrieve DOS or OS/2 Requester using
  625. the option /C:1, username, password, Btrieve logs in
  626. to the NetWare Runtime server with the specified
  627. username and the corresponding password.  Btrieve also
  628. obtains a temporary connection number, which it uses
  629. to distinguish between users.
  630.  
  631. Btrieve verifies that the user has the acceptable
  632. rights to open or create a file.  Btrieve then logs
  633. out of the server, using the temporary connection
  634. number.  If the user has the appropriate file access
  635. rights, Btrieve continues; otherwise, it returns an
  636. error.  The administrator must set up file access
  637. rights on the NetWare Runtime server.
  638.  
  639. When you load the Btrieve DOS or OS/2 Requester using
  640. the /C:1 default option (without specifying a username
  641. and password) and then attempt to read a file on the
  642. NetWare Runtime server, the Requester must determine
  643. what login username Btrieve can use to maintain
  644. NetWare security.  Btrieve then uses that username to
  645. log in temporarily for the client.  In contrast, if
  646. the Requester detects that there is no connection, or
  647. if it cannot find a valid login username, the
  648. Requester returns an error.  For more information
  649. about the NetWare Runtime server support option
  650. available with the DOS and OS/2 Requesters, see
  651. Chapter 4, "Configuring and Using the Requesters."
  652.